<template>
    <div class="body">
        <div id="couponList" style="">
            <div class="c_uscoupon_bgs"></div>
            <!--优惠券弹窗-s-->
            <div
                class="chooseebitcard newchoosecar coupongg"
                style="display: block; height: 100%; top: 0; left: 0"
            >
                <div class="z-Package-hrader">
                    <i
                        class="z-Package-icon Package-icon-close"
                        id="invoice_list_back"
                        @click="closeFapiao()"
                    ></i>
                    <h5>优惠券选择</h5>
                </div>

                <div
                    class="soldout_cp p"
                    id="emptyCoupon"
                    v-show="userCartCouponList.length == 0"
                >
                    <img class="nmy" src="../../assets/images/nmy.png" alt="" />

                    <p class="nzw">当前店铺暂无可使用的优惠券</p>
                </div>

                <div class="c_uscoupon">
                    <div class="maleri30">
                        <div class="no_get_coupon">
                            <p class="canus">
                                可用优惠劵<span
                                    >（以下是当前店铺可使用的优惠劵）</span
                                >
                            </p>

                            <div
                                class="cuptyp"
                                data-couponid="324"
                                data-conponname="test2"
                                v-for="(item, index) in userCartCouponList"
                                :key="index"
                                @click="setCheckcon(item)"
                            >
                                <a href="javascript:;">
                                    <div class="le_pri">
                                        <h1>
                                            <em>￥</em
                                            >{{ item.coupon.money | moneyless }}
                                        </h1>

                                        <p>
                                            满{{ item.coupon.condition }}元可用
                                        </p>
                                    </div>
                                    <div class="ri_int">
                                        <div class="to_two">
                                            <span class="ba">{{
                                                item.coupon.use_type_title
                                            }}</span>
                                            <span>{{ item.coupon.name }}</span>
                                        </div>
                                        <div class="bo_two">
                                            <span class="cp9"
                                                >有效期：{{
                                                    item.coupon.use_start_time
                                                        | timer
                                                }}-{{
                                                    item.coupon.use_end_time
                                                        | timer
                                                }}</span
                                            >
                                        </div>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--优惠券弹窗-e-->
        </div>
    </div>
</template>

<script>
// import { axiosPost } from '../../axios';
// import { Toast } from 'vant';
export default {
    name: '',
    props: ['userCartCouponList'],
    data() {
        return {};
    },
    computed: {},
    mounted() {},
    methods: {
        setCheckcon(data) {
            this.$emit('emitisYouhuidata', data);
            this.closeFapiao();
        },
        // 关闭弹窗
        closeFapiao() {
            this.$emit('setisYouhui', false);
        },
    },
};
</script>

<style lang="less" scope></style>
